﻿@model FPP.Models.Party
@{
    ViewBag.Title = string.Format("Famous People Pool - Details about Party {0}", Model.Name);
}
<fieldset>
    <legend>Details for @Model.Name</legend>
    <div id="leftCol" class="column span-6">
        <div class="display-field">
            <img alt="@Model.Name" src="http://www.famouspeoplepool.com/_assets/images/hollywood-star.jpg" style="max-width: 230px" />
        </div>
        <h1>
            <a href="@Url.Action("Join", "Party", new { id = Model.Id })">Join @Model.Name</a>
        </h1>
        @Html.ActionLink("Back to Parties", "Index")
    </div>
    <div id="rightCol" class="column span-10 clearfix">
        <h1>@Model.Name</h1>
        <div>@Model.ErrorMessage</div>
        <div class="display-label">
            Owner</div>
        <div class="display-field prepend-10px">@Html.Label(Model.Owner().DisplayName)</div>
        <h2>
            Members in @Model.Name
        </h2>
        <ul>
            @foreach (FPP.Models.User u in Model.Users())
            { 
                <li><a href="@Url.Action("View", "User", new { id = Model.Id, u = u.Id })">@u.FirstName</a>
                    @if (u.LoginToken == HttpContext.Current.User.Identity.Name) {
                        Write("(");
                        <a href="@Url.Action("Delete", "Party", new { id = Model.Id })">remove me</a>
                        Write(")");
                    }
                </li>
                
            }
        </ul>
    </div>
</fieldset>
